//
//  NearlyTableViewCell.m
//  littleLight's Project-A
//
//  Created by dllo on 16/5/19.
//  Copyright © 2016年 light. All rights reserved.
//

#import "NearlyTableViewCell.h"

@interface NearlyTableViewCell ()




@end

@implementation NearlyTableViewCell

- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
{
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        [self createView];
        
    }
    return self;
    
}

- (void)createView
{
    self.cover_s = [[UIImageView alloc] init];
    [self.contentView addSubview:self.cover_s];
    
    self.nameLabel = [[UILabel alloc] init];
    self.nameLabel.font = [UIFont systemFontOfSize:23];
    self.nameLabel.font = [UIFont boldSystemFontOfSize:15];
    [self.contentView addSubview:self.nameLabel];
    
    self.contentLabel = [[UILabel alloc] init];
    self.contentLabel.font = [UIFont systemFontOfSize:14];
    self.contentLabel.font = [UIFont boldSystemFontOfSize:14];
    self.contentLabel.numberOfLines = 0;
    [self.contentView addSubview:self.contentLabel];
    
    self.visited_countLabel = [[UILabel alloc] init];
    self.visited_countLabel.font = [UIFont systemFontOfSize:14];
    self.visited_countLabel.font = [UIFont boldSystemFontOfSize:14];
    [self.contentView addSubview:self.visited_countLabel];
    
    
}

- (void)layoutSubviews
{
    [super layoutSubviews];
    self.cover_s.frame = CGRectMake(15, 15, self.contentView.frame.size.width / 4, self.contentView.frame.size.height - 30);
    self.nameLabel.frame = CGRectMake(self.cover_s.frame.size.width + 15 + 10, 0, self.contentView.frame.size.width / 5 * 3, 60);
    self.contentLabel.frame = CGRectMake(self.cover_s.frame.size.width + 15 + 10, self.nameLabel.frame.size.height  , self.contentView.frame.size.width / 5 * 3, 40);
    self.visited_countLabel.frame = CGRectMake(self.nameLabel.frame.origin.x, self.contentView.frame.size.height / 5 * 4 - 20, self.contentView.frame.size.width / 4 * 3, 40);
    
    
}






@end
